﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="query.aspx.cs" Inherits="AnyOffice.general.ipanel.query" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
    <title>人员查询 </title>
</head>
<body class="bodycolor" topmargin="5">
    <form id="Form1" method="post" runat="server">
    <table class="small" cellspacing="0" cellpadding="3" width="100%" border="0">
        <tr>
            <td class="Big">
                <img src="/images/menu/infofind.gif" align="absMiddle"><span class="big3">
                    <asp:Literal ID="litNavName" runat="server" Text="人员查询"></asp:Literal>
                </span>
            </td>
        </tr>
    </table>
    <asp:Panel ID="pnlMain" runat="server">
        <table class="small" cellspacing="1" cellpadding="3" width="450" align="center" bgcolor="#000000"
            border="0">
            <tr>
                <td class="TableData" nowrap>
                    姓名：
                </td>
                <td class="TableData" nowrap>
                    <asp:TextBox ID="txtUserName" runat="server" Columns="10" MaxLength="20" CssClass="BigInput"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="TableData" nowrap>
                    所属：
                </td>
                <td class="TableData" nowrap>
                    <asp:DropDownList ID="ddlDeptId" runat="server" CssClass="BigSelect">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="TableData" nowrap>
                    性别：
                </td>
                <td class="TableData" nowrap>
                    <asp:DropDownList ID="ddlSex" runat="server" CssClass="BigSelect">
                        <asp:ListItem Value="ALL">所有</asp:ListItem>
                        <asp:ListItem Value="True">男</asp:ListItem>
                        <asp:ListItem Value="False">女</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="TableData" nowrap>
                    家庭电话：
                </td>
                <td class="TableData" nowrap>
                    <asp:TextBox ID="txtTelNoDept" runat="server" MaxLength="25" CssClass="BigInput"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="TableData" nowrap>
                    E-mail：
                </td>
                <td class="TableData" nowrap>
                    <asp:TextBox ID="txtEmail" runat="server" Columns="25" MaxLength="200" CssClass="BigInput"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="TableControl" nowrap align="center" colspan="2">
                    &nbsp;
                    <asp:Button ID="btnSubmit" runat="server" CssClass="BigButton" Text="查询" ToolTip="查询用户">
                    </asp:Button>
                </td>
            </tr>
        </table>
    </asp:Panel>
    <asp:Repeater ID="rptUsers" runat="server" EnableViewState="False">
        <HeaderTemplate>
            <table border="0" cellspacing="1" width="100%" class="small" cellpadding="3" bgcolor="#000000">
                <tr class="TableHeader" align="center">
                    <td nowrap>
                        <b>姓名</b>
                    </td>
                    <td nowrap>
                        <b>性别</b>
                    </td>
                    <td nowrap>
                        <b>部门</b>
                    </td>
                    <td nowrap>
                        <b>在线时长</b>
                    </td>
                    <td nowrap>
                        <b>角色</b>
                    </td>
                    <td nowrap>
                        <b>家庭电话</b>
                    </td>
                    <td nowrap>
                        <b>手机</b>
                    </td>
                    <td nowrap>
                        <b>电子邮件</b>
                    </td>
                </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr class="TableLine1" align="center">
                <td nowrap>
                    <a href="user_info.aspx?user_id=<%#Eval("UserId")%>">
                        <%#Eval("UserName")%></a>
                </td>
                <td nowrap>
                    <%#Convert.ToBoolean(Eval("Sex")) == true ? "男" : "女"%>
                </td>
                <td nowrap>
                    <%#Eval("DeptName")%>
                </td>
                <td nowrap>
                    <%#Math.Floor(Convert.ToDouble(Eval( "OnlineTime").ToString()) / 60).ToString() + "小时" + Convert.ToString(Math.Floor(Convert.ToDouble(Eval( "OnlineTime").ToString())) % 60) + "分"%>
                </td>
                <td nowrap>
                    <%#Eval("PrivName")%>
                </td>
                <td nowrap>
                    <%#Eval("TelNoDept")%>
                </td>
                <td nowrap>
                    <%#DisplayMobile(Convert.ToString(Eval("Mobile")), Convert.ToBoolean(Eval("IsHideMobile")))%>
                </td>
                <td nowrap>
                    <a href="mailto:<%#Eval("Email")%>">
                        <%#Eval("Email")%></a>
                </td>
            </tr>
        </ItemTemplate>
        <AlternatingItemTemplate>
            <tr class="TableLine2" align="center">
                <td nowrap>
                    <a href="user_info.aspx?user_id=<%#Eval("UserId")%>">
                        <%#Eval("UserName")%></a>
                </td>
                <td nowrap>
                    <%#Convert.ToBoolean(Eval("Sex")) == true ? "男" : "女"%>
                </td>
                <td nowrap>
                    <%#Eval("DeptName")%>
                </td>
                <td nowrap>
                    <%#Math.Floor(Convert.ToDouble(Eval( "OnlineTime").ToString()) / 60).ToString() + "小时" + Convert.ToString(Math.Floor(Convert.ToDouble(Eval( "OnlineTime").ToString())) % 60) + "分"%>
                </td>
                <td nowrap>
                    <%#Eval("PrivName")%>
                </td>
                <td nowrap>
                    <%#Eval("TelNoDept")%>
                </td>
                <td nowrap>
                    <%#DisplayMobile(Convert.ToString(Eval("Mobile")), Convert.ToBoolean(Eval("IsHideMobile")))%>
                </td>
                <td nowrap>
                    <a href="mailto:<%#Eval("Email")%>">
                        <%#Eval("Email")%></a>
                </td>
            </tr>
        </AlternatingItemTemplate>
        <FooterTemplate>
            </table>
            <br>
            <center>
                <input type="button" class="BigButton" value="返回" onclick="window.location='query.aspx';">
            </center>
        </FooterTemplate>
    </asp:Repeater>
    <asp:Literal ID="litMessage" runat="server"></asp:Literal>
    </form>
</body>
</html>
